import { http } from "@/utils/http"
import { CommonResponse } from "./common"


/**
 * 设置banner的参数
 */
export type BannerParams = {
  /**
   * banner的图片地址
   */
  imageUrl: string
  /**
   * 教师二维码
   */
  qrCodeUrl: string
}

/**
 * 设置banner配置
 */
export function setBannerConfig(data: BannerParams) {
  return http.request<CommonResponse>("post", "/api/platform/banner/set", { data })
}

/**
 * 查询banner配置
 */
export function getBannerConfig() {
  return http.request<CommonResponse<BannerParams>>("get", "/api/platform/banner/get")
}